package com.bestdreamer.thread_stream;

import java.io.PipedOutputStream;

public class Demo1ThreadWrite extends Thread {

    private final Demo1WriteData write;
    private final PipedOutputStream out;

    public Demo1ThreadWrite(Demo1WriteData write, PipedOutputStream out){
        super();
        this.write = write;
        this.out = out;
    }

    @Override
    public void run() {
        write.writeMethod(out);
    }
}
